#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <log_util.h>

#include <QAction>
#include <QGridLayout>
#include <QJsonObject>
#include <QLabel>
#include <QLineEdit>
#include <QList>
#include <QMainWindow>
#include <QMenu>
#include <QPushButton>

class MainWindow : public QMainWindow {
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow() = default;

private:
    void init_menu();

private:
    QMenu *m_menu_file;
    QMenu *m_menu_edit;
    QMenu *m_menu_select;
    QMenu *m_menu_view;
    QMenu *m_menu_goto;
    QMenu *m_menu_run;
    QMenu *m_menu_terminal;
    QMenu *m_menu_help;

    QAction *m_act_file_new;

    QAction                        *m_act_help_welcome;
    QAction                        *m_act_help_show_all_command;
    QAction                        *m_act_help_document;
    QAction                        *m_act_help_tips;
    QAction                        *m_act_help_about;
    QAction                        *m_act_help_about_qt;
    std::shared_ptr<spdlog::logger> log;

private slots:
    void sendEcho();

private:
    void         createGUI();
    QLineEdit   *lineEdit;
    QPushButton *button;
    QGridLayout *layout;
};
#endif  // MAINWINDOW_H
